﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="runlog.aspx.cs" Inherits="status_runlog" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <meta http-equiv="REFRESH" content="10">
</head>
<body>
    <form id="form1" runat="server">
    <h2>
        运行管理</h2>
    <div class="success">
        <%=systemStatus %>
    </div>
    <h3>
        插件状态</h3>
    <asp:Repeater ID="rptPlugins" runat="server" OnItemDataBound="rptPlugins_ItemDataBound">
        <HeaderTemplate>
            <table border="1" cellpadding="0" cellspacing="0" width="100%" id="AutoNumber1">
                <tr>
                    <th>
                        编号
                    </th>
                    <th>
                        运行日志
                    </th>
                    <th>
                        名称
                    </th>
                    <th>
                        状态
                    </th>
                    <th>
                        线程数
                    </th>
                    <th>
                        待采集
                    </th>
                    <th>
                        已采集
                    </th>
                    <th>
                        成功
                    </th>
                    <th>
                        失败
                    </th>
                    <th>
                        开始时间
                    </th>
                    <th>
                        结束时间
                    </th>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
            </tr>
            <td align="center">
                <%# DataBinder.Eval(Container.DataItem,"plugin_id") %>
            </td>
            <td>
                <asp:LinkButton ID="lbPluginLogs" runat="server" CommandName="status_id" OnCommand="LinkButton_Command">查看日志</asp:LinkButton>
            </td>
            <td>
                <%#GetPluginName(Eval("plugin_id").ToString())%>
            </td>
            <td>
                <%# GetRunStatus(Eval("status"))%>
            </td>
            <td>
                <%# Eval("thread_number")%>
            </td>
            <td>
                <%# Eval("total_number") %>
            </td>
            <td>
                <%# Eval("finished_number") %>
            </td>
            <td>
                <%# Eval("success_number") %>
            </td>
            <td>
                <%# Eval("failed_number") %>
            </td>
            <td>
                <%# (new DateTime(Convert.ToInt64(Eval("start_time")))).ToString() %>
            </td>
            <td>
                <%# (new DateTime(Convert.ToInt64(Eval("end_time")))).ToString()%>
            </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            </table></FooterTemplate>
    </asp:Repeater>
    <asp:Panel runat="server" ID="pnlPluginLog">
        <h3>
            <%=currentStatusId %></h3>
        <asp:TextBox ID="txtPluginLogs" runat="server" Height="300px" Width="90%" TextMode="MultiLine"
            ReadOnly="true" BorderStyle="Dotted"></asp:TextBox>
    </asp:Panel>
    </form>
</body>
</html>
